//员工数据API  分支测试
import request from "@/utils/request.js";

//查询全部员工数据
export const queryEmpListApi = (name, gender, begin, end, page, pageSize) => {
  return request.get(
    `/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`
  );
};

//新增员工信息
export const addEmpInfoApi = (emp) => {
  return request.post("/emps", emp);
};
//根据id查询员工详细信息
export const queryEmpByIdApi = (id) => {
  return request.get(`/emps/${id}`);
};
//根据ID更新员工信息
export const updateEmpByIdApi = (emp) => {
  return request.put("/emps", emp);
};
//删除员工
export const deleteEmpByIdApi = (ids) => {
  return request.delete(`/emps?ids=${ids}`);
};
